import { ref } from 'vue'
import { defineStore } from 'pinia'
import type { UserInfo } from '../interfaces/user.ts'
export const userStore = defineStore('user', () => {
    interface UserOrderInfo {
        buy: Record<string, any>;
        sell: Record<string, any>;
    }
    const userOrderInfo = ref<UserOrderInfo>({
        buy: {},
        sell: {},
    })
    const setUserOrderInfo = (type: keyof UserOrderInfo, key: string, val: any) => {
        userOrderInfo.value[type][key] = val
    }

    const cctSocket = ref(false)
    const currencySocket = ref(false)
    const futures = ref(false)
    const hycurrencySocket = ref(false)
    const setCctSocket = (val: boolean) => {
        cctSocket.value = val
    }
    const setCurrencySocket = (val: boolean) => {
        currencySocket.value = val
    }
    const setFuturesSocket = (val: boolean) => {
        futures.value = val
    }
    const setHycurrencySocket = (val: boolean) => {
        hycurrencySocket.value = val
    }
    const loginFromRouter = ref('')
    const setLoginFromRouter = (val: string) => {
        loginFromRouter.value = val
    }
    const userWallet = ref({
        usdt: '0.00000000'
    })
    const buyStatus = ref(0)
    const sellStatus = ref(0)
    const setBuyStatus = (val: number) => {
        buyStatus.value = val
    }
    const setSellStatus = (val: number) => {
        sellStatus.value = val
    }
    const userInfo = ref<UserInfo>({
        id: '',
        mobilePhone: '',
        nickName: '',
        avatar: null,
        email: '',
        lowAuth: '',
        highAuth: null,
        grade: '',
        hasPassword: false,
        token: '',
        invitationCode: '',
        bindGoogleAuth: false,
        phone: ''
    })
    const loginOut = () => {
        userInfo.value = {
            id: '',
            mobilePhone: '',
            nickName: '',
            avatar: null,
            email: '',
            lowAuth: '',
            highAuth: null,
            grade: '',
            hasPassword: false,
            token: '',
            invitationCode: '',
            bindGoogleAuth: false,
            phone: ''
        }
    }
    const contractLayout = ref({
        lg: [
            {
                "x": 0,
                "y": 0,
                "w": 20,
                "h": 2,
                "i": "0",
                "moved": false
            },
            {
                "x": 20,
                "y": 0,
                "w": 5,
                "h": 15,
                "i": "2",
                "moved": false
            },
            {
                "x": 0,
                "y": 2,
                "w": 20,
                "h": 22,
                "i": "3",
                "moved": false
            },
            {
                "x": 25,
                "y": 0,
                "w": 5,
                "h": 24,
                "i": "4",
                "moved": false
            },
            {
                "x": 20,
                "y": 15,
                "w": 5,
                "h": 9,
                "i": "5",
                "moved": false
            },
            {
                "x": 0,
                "y": 24,
                "w": 30,
                "h": 10,
                "i": "6",
                "moved": false
            }
        ],
        md: [
            { x: 0, y: 0, w: 30, h: 2, i: '0' },
            { x: 10, y: 14, w: 11, h: 12, i: '2' },
            { x: 0, y: 2, w: 21, h: 16, i: '3' },
            { x: 21, y: 2, w: 9, h: 36, i: '4' },
            { x: 0, y: 14, w: 10, h: 12, i: '5' },
            { x: 0, y: 24, w: 21, h: 8, i: '6' },
        ],
        sm: [
            { x: 0, y: 0, w: 30, h: 6, i: '0' },
            { x: 0, y: 5, w: 30, h: 20, i: '3' },
            { x: 0, y: 25, w: 30, h: 12, i: '6' },

        ]
    })
    const changeContractLayout = (type: 'lg' | 'md' | 'sm', val: any) => {
        contractLayout.value[type] = val
    }
    const sizeLayout = ref({
        lg: [
            { x: 0, y: 0, w: 23, h: 2, i: '0' },
            { x: 23, y: 0, w: 7, h: 14, i: '1' },
            { x: 0, y: 2, w: 7, h: 30, i: '2', },
            { x: 7, y: 2, w: 16, h: 19, i: '3' },
            { x: 7, y: 21, w: 16, h: 11, i: '4' },
            { x: 23, y: 14, w: 7, h: 18, i: '5' },
            { x: 0, y: 31, w: 30, h: 10, i: '6' }
        ],
        md: [
            { x: 0, y: 0, w: 30, h: 2, i: '0' },
            { x: 10, y: 14, w: 11, h: 12, i: '2' },
            { x: 0, y: 2, w: 21, h: 16, i: '3' },
            { x: 21, y: 2, w: 9, h: 36, i: '4' },
            { x: 0, y: 14, w: 10, h: 12, i: '5' },
            { x: 0, y: 24, w: 21, h: 8, i: '6' },
        ],
        sm: [
            { x: 0, y: 0, w: 30, h: 6, i: '0' },
            { x: 0, y: 5, w: 30, h: 20, i: '3' },
            { x: 0, y: 25, w: 30, h: 12, i: '6' },

        ]
    })
    const changeSizeLayout = (type: 'lg' | 'md' | 'sm', val: any) => {
        sizeLayout.value[type] = val
    }
    const defalutSizeLayout = ref({
        lg: [
            { x: 0, y: 0, w: 23, h: 2, i: '0', 'minH': 2, 'max-w': 9, 'maxH': 2, 'is-resizable': false, 'isLogin': false },
            { x: 23, y: 0, w: 7, h: 14, i: '1', 'isLogin': false },
            { x: 0, y: 2, w: 7, h: 29, i: '2', 'min-w': 2, 'min-h': 12, 'is-resizable': true, 'is-draggable': true, 'isLogin': false },
            { x: 7, y: 2, w: 16, h: 19, i: '3', 'isLogin': false },
            { x: 7, y: 21, w: 16, h: 10, i: '4', 'isLogin': false },
            { x: 23, y: 14, w: 7, h: 17, i: '5', 'isLogin': false },
            { x: 0, y: 31, w: 30, h: 10, i: '6', 'isLogin': false }
        ],
        md: [
            { x: 0, y: 0, w: 30, h: 2, i: '0', 'min-h': 2, 'max-w': 12, 'max-h': 2, 'is-resizable': false },
            { x: 10, y: 14, w: 11, h: 12, i: '2' },
            { x: 0, y: 2, w: 21, h: 16, i: '3' },
            { x: 21, y: 2, w: 9, h: 36, i: '4' },
            { x: 0, y: 14, w: 10, h: 12, i: '5' },
            { x: 0, y: 24, w: 21, h: 8, i: '6' },
        ],
        sm: [
            { x: 0, y: 0, w: 30, h: 6, i: '0', 'min-h': 2, 'max-w': 12, 'max-h': 2, 'is-resizable': false },
            { x: 0, y: 5, w: 30, h: 20, i: '3' },
            { x: 0, y: 25, w: 30, h: 12, i: '6' },

        ]
    })
    const defaluttMainIndicator = {
        ma: {
            hide: true,
            checked: true,
            list: [
                { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1 },
                { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1 },
                { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1 },
                { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1 },
                { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1 },
                { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1 },
                { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1 },
                { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1 },
                { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1 },
                { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1 },
            ]
        },
        ema: {
            hide: true,
            checked: false,
            list: [
                { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1 },
                { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1 },
                { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1 },
                { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1 },
                { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1 },
                { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1 },
                { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1 },
                { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1 },
                { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1 },
                { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1 },
            ]
        }
    }
    const mainIndicator = ref({
        ma: {
            hide: true,
            checked: true,
            list: [
                { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
            ]
        },
        ema: {
            hide: true,
            checked: false,
            list: [
                { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
            ]
        },
        vol: {
            hide: true,
            checked: false,
            barType: {
                long: 'fill',
                short: 'fill'
            },
            list: [
                { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
            ]
        },
        macd: {
            hide: true,
            checked: false,
            periodList: [
                { title: '快线周期', value: '12' },
                { title: '慢线周期', value: '26' },
                { title: '信号周期', value: '9' }
            ],
            list: [
                { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                { title: 'MACD', code: 'macd', checked: true },
            ],
            type: {
                LongGrow: {
                    type: 'stroke',
                    color: '#2ebd85'
                },
                ShortGrow: {
                    type: 'stroke',
                    color: '#f6465d'
                },
                LongFall: {
                    type: 'fill',
                    color: '#2ebd85'
                },
                ShortFall: {
                    type: 'fill',
                    color: '#f6465d'
                }
            }
        }
    } as Record<string, any>)
    const setMainIndicator = (type: string, value: any) => {
        const hide = mainIndicator.value[type].hide
        value.hide = hide
        mainIndicator.value[type] = value
    }
    const setMainIndicatorHiden = (type: string, value: boolean) => {
        mainIndicator.value[type].hide = value
    }
    const setMainIndicatorChecked = (type: string, value: boolean) => {
        mainIndicator.value[type].checked = value
    }
    const loveList = ref<string[]>([])
    const setUserInfo = (value: any) => {
        userInfo.value = Object.assign({}, userInfo.value, value)
    }
    const addLoveItem = (value: string) => {
        loveList.value.push(value)
    }
    const remvoeLoveItem = (value: string) => {
        loveList.value = loveList.value.filter((item) => item !== value)
    }
    const reSetUserInfo = () => {
        userInfo.value = {
            id: '',
            mobilePhone: '',
            nickName: '',
            avatar: null,
            email: '',
            lowAuth: '',
            highAuth: null,
            grade: '',
            hasPassword: false,
            token: '',
            invitationCode: '',
            bindGoogleAuth: false,
            phone: ''
        }
    }
    return { userInfo, contractLayout, setFuturesSocket, futures, hycurrencySocket, setHycurrencySocket, changeContractLayout, userOrderInfo, setUserOrderInfo, buyStatus, setBuyStatus, sellStatus, setSellStatus, changeSizeLayout, userWallet, loginOut, loginFromRouter, setLoginFromRouter, cctSocket, setCctSocket, setCurrencySocket, currencySocket, setUserInfo, reSetUserInfo, sizeLayout, loveList, addLoveItem, remvoeLoveItem, mainIndicator, setMainIndicator, setMainIndicatorHiden, setMainIndicatorChecked, defaluttMainIndicator }
}, {
    persist: {
        storage: {
            getItem(key) {
                return localStorage.getItem(key)
            },
            setItem(key, value) {
                localStorage.setItem(key, value)
            }
        }
    }
}
)

interface MainIndicator {
    [key: string]: any; // 允许动态指标类型（如 'ma'、'ema' 等）
}
interface TwoCharItem {
    mainIndicator: MainIndicator;
    coin: string;
    priceInfo: Record<string, any>;
    inCharts: boolean;
    kLineType: string;
    infoMA: Record<string, any>;
}

export const kanbanStore = defineStore('kanban', () => {
    const twoChars = ref<TwoCharItem[]>([
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
    ])
    const threeChars = ref<TwoCharItem[]>([
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
    ])
    const fourChars = ref<TwoCharItem[]>([
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        }
    ])
    const sixChars = ref<TwoCharItem[]>([
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
        {
            coin: 'BTC',
            inCharts: false,
            kLineType: '15分钟',
            infoMA: {},
            priceInfo: {
                close: 0,
                high: 0,
                low: 0,
                open: 0,
                time: 0,
                volume: 0
            },
            mainIndicator: {
                ma: {
                    hide: true,
                    checked: true,
                    list: [
                        { title: 'MA1', code: 'ma1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'MA2', code: 'ma2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'MA3', code: 'ma3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'MA4', code: 'ma4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'MA5', code: 'ma5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'MA6', code: 'ma6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'MA7', code: 'ma7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'MA8', code: 'ma8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'MA9', code: 'ma9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'MA10', code: 'ma10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                ema: {
                    hide: true,
                    checked: false,
                    list: [
                        { title: 'EMA1', code: 'ema1', checked: true, value: '7', color: '#f0b90b', lineSize: 1, lineType: 'close' },
                        { title: 'EMA2', code: 'ema2', checked: true, value: '25', color: '#eb40b5', lineSize: 1, lineType: 'close' },
                        { title: 'EMA3', code: 'ema3', checked: true, value: '99', color: '#71269c', lineSize: 1, lineType: 'close' },
                        { title: 'EMA4', code: 'ema4', checked: false, value: '0', color: '#d63864', lineSize: 1, lineType: 'close' },
                        { title: 'EMA5', code: 'ema5', checked: false, value: '0', color: '#50ae55', lineSize: 1, lineType: 'close' },
                        { title: 'EMA6', code: 'ema6', checked: false, value: '0', color: '#f37f20', lineSize: 1, lineType: 'close' },
                        { title: 'EMA7', code: 'ema7', checked: false, value: '0', color: '#af6cc3', lineSize: 1, lineType: 'close' },
                        { title: 'EMA8', code: 'ema8', checked: false, value: '0', color: '#5fc3d7', lineSize: 1, lineType: 'close' },
                        { title: 'EMA9', code: 'ema9', checked: false, value: '0', color: '#3860f6', lineSize: 1, lineType: 'close' },
                        { title: 'EMA10', code: 'ema10', checked: false, value: '0', color: '#43db5d', lineSize: 1, lineType: 'close' },
                    ]
                },
                vol: {
                    hide: true,
                    checked: false,
                    barType: {
                        long: 'fill',
                        short: 'fill'
                    },
                    list: [
                        { title: 'MAVOL1', code: 'mavol1', checked: true, value: '5', color: '#5fc3d7', lineSize: 1 },
                        { title: 'MAVOL2', code: 'mavol2', checked: true, value: '10', color: '#d63864', lineSize: 1 },
                    ]
                },
                macd: {
                    hide: true,
                    checked: false,
                    periodList: [
                        { title: '快线周期', value: '12' },
                        { title: '慢线周期', value: '26' },
                        { title: '信号周期', value: '9' }
                    ],
                    list: [
                        { title: 'DEA', code: 'dea', checked: true, color: '#eb40b5', lineSize: 1 },
                        { title: 'DIF', code: 'dif', checked: true, color: '#71269c', lineSize: 1 },
                        { title: 'MACD', code: 'macd', checked: true },
                    ],
                    type: {
                        LongGrow: {
                            type: 'stroke',
                            color: '#2ebd85'
                        },
                        ShortGrow: {
                            type: 'stroke',
                            color: '#f6465d'
                        },
                        LongFall: {
                            type: 'fill',
                            color: '#2ebd85'
                        },
                        ShortFall: {
                            type: 'fill',
                            color: '#f6465d'
                        }
                    }
                }
            }
        },
    ])
    const setMainIndicator = (type: string, index: number, indicatorType: string, value: any) => {
        if (type === 'twoChars') {
            const hide = twoChars.value[index].mainIndicator[indicatorType].hide
            value.hide = hide
            twoChars.value[index].mainIndicator[indicatorType] = value
        } else if (type === 'threeChars') {
            const hide = threeChars.value[index].mainIndicator[indicatorType].hide
            value.hide = hide
            threeChars.value[index].mainIndicator[indicatorType] = value
        }
    }
    const setMainIndicatorInfo = (type: string, index: number, indicatorType: 'infoMA', value: any) => {
        if (type === 'twoChars') {
            twoChars.value[index][indicatorType] = value
        } else if (type === 'threeChars') {
            threeChars.value[index][indicatorType] = value
        }
    }
    const setInCharts = (type: string, index: number, value: boolean) => {
        if (type === 'twoChars') {
            twoChars.value[index].inCharts = value
        } else if (type === 'threeChars') {
            threeChars.value[index].inCharts = value
        } else if (type === 'fourChars') {
            fourChars.value[index].inCharts = value
        }
    }
    const setCoinKlineType = (type: string, index: number, value: string) => {
        if (type === 'twoChars') {
            twoChars.value[index].kLineType = value
        } else if (type === 'threeChars') {
            threeChars.value[index].kLineType = value
        } else if (type === 'fourChars') {
            fourChars.value[index].kLineType = value
        } else if (type === 'sixChars') {
            sixChars.value[index].kLineType = value
        }
    }
    const setMainIndicatorChecked = (type: string, index: number, info: string, value: boolean) => {
        if (type === 'twoChars') {
            twoChars.value[index].mainIndicator[info].checked = value
        } else if (type === 'threeChars') {
            threeChars.value[index].mainIndicator[info].checked = value
        }
    }
    const setMainIndicatorHiden = (type: string, index: number, info: string, value: boolean) => {
        if (type === 'twoChars') {
            twoChars.value[index].mainIndicator[info].hide = value
        } else if (type === 'threeChars') {
            threeChars.value[index].mainIndicator[info].hide = value
        }
    }
    const setCoinlineName = (type: string, index: number, value: string) => {
        if (type === 'twoChars') {
            twoChars.value[index].coin = value
        } else if (type === 'threeChars') {
            threeChars.value[index].coin = value
        } else if (type === 'fourChars') {
            fourChars.value[index].coin = value
        } else if (type === 'sixChars') {
            sixChars.value[index].coin = value
        }
    }
    const setCoinPriceInfo = (type: string, index: number, value: any) => {
        if (type === 'twoChars') {
            twoChars.value[index].priceInfo = value
        } else if (type === 'threeChars') {
            threeChars.value[index].priceInfo = value
        } else if (type === 'fourChars') {
            fourChars.value[index].priceInfo = value
        } else if (type === 'sixChars') {
            sixChars.value[index].priceInfo = value
        }
    }
    return { twoChars, threeChars, setCoinPriceInfo, setMainIndicatorHiden, setMainIndicatorChecked, setMainIndicator, setInCharts, setMainIndicatorInfo, fourChars, sixChars, setCoinKlineType, setCoinlineName }
}, {
    persist: {
        storage: {
            getItem(key) {
                return localStorage.getItem(key)
            },
            setItem(key, value) {
                localStorage.setItem(key, value)
            }
        }
    }
})
